﻿@model Dexter.Web.Mvc.ViewModel.Backoffice.ViewsData.CategoryController.CategoryIndexViewData
@{
	ViewBag.Title = "Index";
	Layout = "~/Areas/Admin/Views/Shared/_BackOffice.cshtml";
}
<section class="grid_12">
	<div class="block-border">
			<form class="block-content form" id="table_form" method="post" action="#">
			<h1>Categories</h1>
			
			<div class="no-margin">
				<table class="table" cellspacing="0" width="100%">
				
				<thead>
					<tr>
						<th class="col">ID</th>
						<th scope="col">Name</th>
						<th scope="col">Content Number</th>
						<th scope="col">FeedBurner Url</th>
						<th scope="col" class="table-actions">Actions</th>
					</tr>
				</thead>

				<tbody>
					@foreach(var category in Model.Categories) {
					<tr>
						<th scope="row" class="table-check-cell">
							@category.Id
						</th>
						<td>
							@if(!category.IsChild) { 
								<strong>@category.Name</strong> 
							}else{ 
								<div style="margin-left: 20px;">@category.Name</div>
							}
						</td>
						<td>
							@category.ContentNumber
						</td>
						<td>
							<a href="@category.FeedBurnerUrl" alt="Open FeedBurner link." target="_blank">
								@category.FeedBurnerUrl
							</a>
						</td>
						<td class="table-actions">
							<a href="@U.Category.Detail(category)" title="View" class="with-tip" target="_blank"><img src="@Url.Content( "~/admin/Resources/images/Icons/Fugue/magnifier.png" )" width="16" height="16" alt="View Item" /></a>
							<a href="@U.Category.Edit(category)" title="Edit" class="with-tip"><img src="@Url.Content( "~/admin/Resources/images/Icons/Fugue/pencil.png" )" width="16" height="16" alt="Edit Item" /></a>
							<a href="@U.Category.Delete(category)" title="Delete" class="with-tip"><img src="@Url.Content( "~/admin/Resources/images/Icons/Fugue/cross-circle.png" )" width="16" height="16" alt="Delete Item" /></a>
						</td>
					</tr>
					}
				</tbody>

			</table>
		</div>
					
		</form>
	</div>
</section>
